/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Attributes.ipp.zapt

#include <clusters/ThreadNetworkDiagnostics/Attributes.h>

#include <app/data-model/Decode.h>
#include <app/data-model/WrappedStructEncoder.h>

namespace chip
{
namespace app
{
	namespace Clusters
	{
		namespace ThreadNetworkDiagnostics
		{
			namespace Attributes
			{
				CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader &reader,
									   const ConcreteAttributePath &path)
				{
					switch (path.mAttributeId) {
					case Attributes::Channel::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, channel);
					case Attributes::RoutingRole::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, routingRole);
					case Attributes::NetworkName::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, networkName);
					case Attributes::PanId::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, panId);
					case Attributes::ExtendedPanId::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, extendedPanId);
					case Attributes::MeshLocalPrefix::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, meshLocalPrefix);
					case Attributes::OverrunCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, overrunCount);
					case Attributes::NeighborTable::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, neighborTable);
					case Attributes::RouteTable::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, routeTable);
					case Attributes::PartitionId::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, partitionId);
					case Attributes::Weighting::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, weighting);
					case Attributes::DataVersion::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, dataVersion);
					case Attributes::StableDataVersion::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, stableDataVersion);
					case Attributes::LeaderRouterId::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, leaderRouterId);
					case Attributes::DetachedRoleCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, detachedRoleCount);
					case Attributes::ChildRoleCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, childRoleCount);
					case Attributes::RouterRoleCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, routerRoleCount);
					case Attributes::LeaderRoleCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, leaderRoleCount);
					case Attributes::AttachAttemptCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, attachAttemptCount);
					case Attributes::PartitionIdChangeCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, partitionIdChangeCount);
					case Attributes::BetterPartitionAttachAttemptCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, betterPartitionAttachAttemptCount);
					case Attributes::ParentChangeCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, parentChangeCount);
					case Attributes::TxTotalCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txTotalCount);
					case Attributes::TxUnicastCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txUnicastCount);
					case Attributes::TxBroadcastCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txBroadcastCount);
					case Attributes::TxAckRequestedCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txAckRequestedCount);
					case Attributes::TxAckedCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txAckedCount);
					case Attributes::TxNoAckRequestedCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txNoAckRequestedCount);
					case Attributes::TxDataCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txDataCount);
					case Attributes::TxDataPollCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txDataPollCount);
					case Attributes::TxBeaconCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txBeaconCount);
					case Attributes::TxBeaconRequestCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txBeaconRequestCount);
					case Attributes::TxOtherCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txOtherCount);
					case Attributes::TxRetryCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txRetryCount);
					case Attributes::TxDirectMaxRetryExpiryCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txDirectMaxRetryExpiryCount);
					case Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txIndirectMaxRetryExpiryCount);
					case Attributes::TxErrCcaCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txErrCcaCount);
					case Attributes::TxErrAbortCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txErrAbortCount);
					case Attributes::TxErrBusyChannelCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, txErrBusyChannelCount);
					case Attributes::RxTotalCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxTotalCount);
					case Attributes::RxUnicastCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxUnicastCount);
					case Attributes::RxBroadcastCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxBroadcastCount);
					case Attributes::RxDataCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxDataCount);
					case Attributes::RxDataPollCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxDataPollCount);
					case Attributes::RxBeaconCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxBeaconCount);
					case Attributes::RxBeaconRequestCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxBeaconRequestCount);
					case Attributes::RxOtherCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxOtherCount);
					case Attributes::RxAddressFilteredCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxAddressFilteredCount);
					case Attributes::RxDestAddrFilteredCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxDestAddrFilteredCount);
					case Attributes::RxDuplicatedCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxDuplicatedCount);
					case Attributes::RxErrNoFrameCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxErrNoFrameCount);
					case Attributes::RxErrUnknownNeighborCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxErrUnknownNeighborCount);
					case Attributes::RxErrInvalidSrcAddrCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxErrInvalidSrcAddrCount);
					case Attributes::RxErrSecCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxErrSecCount);
					case Attributes::RxErrFcsCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxErrFcsCount);
					case Attributes::RxErrOtherCount::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rxErrOtherCount);
					case Attributes::ActiveTimestamp::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, activeTimestamp);
					case Attributes::PendingTimestamp::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, pendingTimestamp);
					case Attributes::Delay::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, delay);
					case Attributes::SecurityPolicy::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, securityPolicy);
					case Attributes::ChannelPage0Mask::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, channelPage0Mask);
					case Attributes::OperationalDatasetComponents::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, operationalDatasetComponents);
					case Attributes::ActiveNetworkFaultsList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, activeNetworkFaultsList);
					case Attributes::ExtAddress::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, extAddress);
					case Attributes::Rloc16::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, rloc16);
					case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, generatedCommandList);
					case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, acceptedCommandList);
					case Attributes::AttributeList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, attributeList);
					case Attributes::FeatureMap::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, featureMap);
					case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, clusterRevision);
					default:
						return CHIP_NO_ERROR;
					}
				}
			} // namespace Attributes
		} // namespace ThreadNetworkDiagnostics
	} // namespace Clusters
} // namespace app
} // namespace chip
